Skip to content

refactor: extract the sidebar slice from useStore - #79

Merged
IAnMove merged 1 commit into
mainfrom
refactor/usestore-sidebar-slice
Sep 2, 2026
Merged

refactor: extract the sidebar slice from useStore#79
IAnMove merged 1 commit into
mainfrom
refactor/usestore-sidebar-slice

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Resultado

Siguiente corte acotado de useStore: createSidebarSlice en ui/src/stores/sidebarSlice.ts.

  • useStore.ts sigue siendo la fachada pública (sidebarOpen, toggleSidebar, setSidebarOpen)
  • estado en memoria, sin persistencia; sidebarOpen arranca en false
  • no toca retakeDialog, mediaFilter, gallery, settings, theme, developerMode, Story/Series/Comics ni agentActions.ts
  • boy scout no aplica: no se tocan componentes visibles ni catálogos i18n
  • único PR pendiente que modifica useStore.ts

Verificación local

  • npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/architectureSlices.test.mjs 8/8
  • npm test 487
  • lint --max-warnings=0
  • tsc -b
  • python scripts/architecture_contracts.py

Pendiente de CI.


Note

Low Risk
Mechanical store refactor with no API or UI changes; sidebar consumers keep using the same useStore selectors.

Overview
Moves sidebar open/close state out of useStore into a dedicated createSidebarSlice module, matching the existing slice pattern (settings, theme, developer mode).

useStore still exposes the same public API (sidebarOpen, toggleSidebar, setSidebarOpen); behavior is unchanged—in-memory only, default sidebarOpen: false. An architecture test asserts the slice and the store facade stay in sync.

Reviewed by Cursor Bugbot for commit 3975ad6. Configure here.

@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 3 file(s); +45/-4; React UI

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • added: ui/src/stores/sidebarSlice.ts
  • modified: ui/src/stores/useStore.ts, ui/tests/architectureSlices.test.mjs

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3975ad6. Configure here.

@IAnMove
IAnMove merged commit fadec63 into main Sep 2, 2026
5 checks passed
@IAnMove
IAnMove deleted the refactor/usestore-sidebar-slice branch September 5, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant